package com.nervenets.shopping.controller.user.params;

import com.nervenets.general.Global;
import com.nervenets.shopping.enumeration.Gender;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

import javax.validation.constraints.*;
import java.io.Serializable;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class MobileRegisterParams implements Serializable {
    @ApiModelProperty(value = "手机号", required = true)
    @Pattern(regexp = Global.RegExp.MOBILE, message = "请输入正确的手机号码")
    private String mobile;
    @ApiModelProperty(value = "密码", required = true)
    @NotBlank
    @Size(min = 6, max = 20)
    private String password;
    @ApiModelProperty(value = "重复密码", required = true)
    @NotBlank
    private String password2;
    @ApiModelProperty(value = "手机验证码", required = true)
    @Min(value = 100000, message = "请输入六位数字验证码")
    @Max(value = 999999, message = "请输入六位数字验证码")
    private int validationCode;
    @ApiModelProperty(value = "用户头像")
    private String avatar;
    @ApiModelProperty(value = "用户昵称")
    @NotBlank
    @Size(max = 20)
    private String name;
    @ApiModelProperty(value = "性别")
    private Gender gender;
    @ApiModelProperty(value = "邀请人ID")
    private long inviteUserId;

}
